home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software 2000
/
Software 2000 Volume 1 (Disc 1 of 2).iso
/
utilities
/
u267.dms
/
u267.adf
/
INC9110B.LZH
/
include
/
math.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-10-12
|
3KB
|
92 lines
/*
* Libraries and headers for PDC release 3.3 (C) 1989 Lionel Hummel.
* PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
* PDC I/O Library (C) 1987 by J.A. Lydiatt.
*
* This code is freely redistributable upon the conditions that this
* notice remains intact and that modified versions of this file not
* be included as part of the PDC Software Distribution without the
* express consent of the copyright holders. No warrantee of any
* kind is provided with this code. For further information, contact:
*
* PDC Software Distribution Internet: BIX:
* P.O. Box 4006 or hummel@cs.uiuc.edu lhummel
* Urbana, IL 61801-8801 petersen@uicsrd.csrd.uiuc.edu
*/
/* math.h - standard C math functions and constants */
/*
* 3.3.91 sjw; K&R2, ensure only effective once
* 21.4.91 sjw; remove unimplemented functions
* 18.6.91 sjw; remove commentary, add inverse hyperbolics. isnan(), isinf(),
* max(), min(), poly(), rint(), sign() (which have all been
* there all along)
* 12.10.91 sjw; remove max(), min(), [mod()] which have names which don't
* indicate that they are math operations and aren't part
* of either K&R's statement or SunOS.
*/
#ifndef __MATH_H__
#define __MATH_H__
double modf(double x, double *ip);
double ldexp(double x, int n);
double frexp(double x, int *exp);
double acos(double x);
double asin(double x);
double atan(double x);
double atan2(double y, double x);
double cos(double x);
double sin(double x);
double tan(double x);
double cosh(double x);
double tanh(double x);
double sinh(double x);
double sqrt(double x);
double fabs(double x);
double floor(double x);
double ceil(double x);
double exp(double x);
double log(double x);
double log10(double x);
double pow(double x, double y);
/* extras */
double acosh(double x);
double atanh(double x);
double asinh(double x);
int isnan(double x);
int isinf(double x);
double poly(int order, double coeffs[], double x);
double rint(double x);
double sign(double x, double y);
#define BITS(type) (8 * (int)sizeof(type))
#define MAXDOUBLE 1.79769313486231470e+308
#define MAXFLOAT ((float)3.40282346638528860e+38)
#define MINDOUBLE 4.94065645841246544e-324
#define MINFLOAT ((float)1.40129846432481707e-45)
#define DMINEXP (-(DMAXEXP + DSIGNIF - 4))
#define FMINEXP (-(FMAXEXP + FSIGNIF - 4))
#define DSIGNIF (BITS(double)-11)
#define FSIGNIF (BITS(float)-8)
#define DMAXEXP (1 << 11 - 1)
#define FMAXEXP (1 << 8 - 1)
#endif /* __MATH_H__ */